<template>
  <div class="wai">

      <p class="shang">
        <span>订单编号:15041305000006958388</span>
        <span>订单状态:</span>
        <span>待付款</span>
        <span>立即支付</span>
        <span>取消订单</span>
      </p>
    <div class="content">
      <div class="xinxi">
        <p>
          <span>支付方式</span>
          <span>支付宝</span>
        </p>
        <p>
          <span>支付流水号</span>
          <span>4646531651651651</span>
        </p>
        <p>
          <span>下单时间</span>
          <span>2016-04-03 16:11:38</span>
        </p>
        <p>
          <span>支付时间</span>
          <span>2016-04-03 16:11:38</span>
        </p>
        <p>
          <span>发货时间</span>
          <span>2016-04-03 16:30:54</span>
        </p>
        <p>
          <span>收货时间</span>
          <span></span>
        </p>
        <p>
          <span>订单备注</span>
          <span>包好点别坏了</span>
        </p>
      </div>
      <p class="waf">收货人信息</p>
      <div class="bdwaik">
        <p>
          <span>收货人姓名</span>
          <span>小张</span>
        </p>
        <p>
          <span>地址</span>
          <span>河南省郑州市高新区枫杨街道莲花街55号</span>
        </p>
        <p>
          <span>联系方式</span>
          <span>手机 : 18037172802</span>
        </p>
      </div>

      <p class="waf">发票信息</p>
      <div class="bdwaik" style="height: 92px">
        <p>
          <span>发票抬头</span>
          <span>蓝鸥科技有限公司</span>
        </p>
        <p>
          <span>发票内容</span>
          <span>明细</span>
        </p>
      </div>

      <p class="waf">物流信息</p>
      <div class="lhin">
        <p>联系人 : 小李</p>
        <p>联系方式 : 17633333333</p>
      </div>
      <p class="waf">卖家信息</p>
      <div class="bdwaik">
        <p>
          <span>店铺名称</span>
          <span>爱果果水果店</span>
        </p>
        <p>
          <span>真实姓名</span>
          <span>小张</span>
        </p>
        <p>
          <span>联系电话</span>
          <span>手机 : 17633559057</span>
        </p>
      </div>

      <div >
        <div class="maide">
          <p class="guige">
            <span>商品名称</span>
            <span>规格</span>
            <span>单价</span>
            <span>数量</span>
            <span>金额</span>
          </p>
          <div class="yigeshangpin" v-for="(item,index) in date">
            <p><img :src="item.url" alt=""></p>
            <p>{{item.name}}</p>
            <p>{{item.name1}}</p>
            <p>￥35.0</p>
            <p class="shuliang"><span @click="jian(index)">-</span><span>{{item.shu}}</span><span @click="jia(index)">+</span></p>
            <p>￥{{item.name2*item.shu}}</p>

          </div>
          <div class="dangezong">
            <p class="jiage">
              <span>商家合计</span>
              <span>￥{{dd}}</span>
            </p>
            <div class="btn">
              <p class="duihuan">立即兑换</p>
              <p class="quxiao">取消订单</p>
              <div style="clear: both"></div>
            </div>
          </div>

        </div>

      </div>

    </div>
  </div>
</template>

<script>
  export default {
    name: "OrderDetail",
    data() {
      return {
        zavz: 0,
        daz: 0,
        show: true,
        aa: 0,
        dd:0,
        xd:0,
        ee:0,
        jf:0,
        oop:'默认地址',
        ooq:'设置默认地址',
        ff:5,
        rr:false,
        rr1:false,
        rr2:false,
        cc: 0,
        dart:[
          {},
          {}
        ],
        date: [
          {id: '0', 'url':'../../../static/zwf/mine/pg.png', name: '云南昭通丑苹果', name1: '8个装', name2: 35, shu: 0},
          {id: '1', 'url':'../../../static/zwf/mine/pg.png', name: '云南昭通丑苹果', name1: '8个装', name2: 35, shu: 0},
          // {id: '2', 'url':'../../../static/zwf/mine/pg.png', name: '云南昭通丑苹果', name1: '8个装', name2: 35, shu: 0},
        ],
        data: [
          /*{
            url: require('../../assets/my/xuanzhong.png'),
            name: '但小兵 北京 北京市 昌平区 天通苑明天第一城4号楼101 固定电话010-21541589',
            name1: '默认地址',
            name2: '',
            name3: '修改',
            name4: '删除',
            name5: '设置默认地址',
            url1: require('../../assets/my/weixuanzhong.png')
          },
          {
            url: require('../../assets/my/xuanzhong.png'),
            name: '但小兵 北京 北京市 昌平区 天通苑明天第一城4号楼101 固定电话010-21541589',
            name1: '默认地址',
            name2: '',
            name3: '修改',
            name4: '删除',
            name5: '设置默认地址',
            url1: require('../../assets/my/weixuanzhong.png')
          },
          {
            url: require('../../assets/my/xuanzhong.png'),
            name: '但小兵 北京 北京市 昌平区 天通苑明天第一城4号楼101 固定电话010-21541589',
            name1: '默认地址',
            name2: '',
            name3: '修改',
            name4: '删除',
            name5: '设置默认地址',
            url1: require('../../assets/my/weixuanzhong.png')
          },
          {
            url: require('../../assets/my/xuanzhong.png'),
            name: '但小兵 北京 北京市 昌平区 天通苑明天第一城4号楼101 固定电话010-21541589',
            name1: '默认地址',
            name2: '',
            name3: '修改',
            name4: '删除',
            name5: '设置默认地址',
            url1: require('../../assets/my/weixuanzhong.png')
          },*/
        ]
      }

    },
    methods: {
      shezhimoren(index) {
        this.zavz = index;
      },
      xuanshouhuo(index) {
        this.daz = index;
      },

      zhankai() {
        this.show = true;
      },

      bianse(index){
        this.xd=index;
      },
      shouqi() {
        this.show = false;
      },
      jian(index) {
        if (this.date[index].shu <= 0) {
          this.date[index].shu = 0;
          this.cc -= 0;

          // this.date[index].name2 -= this.date[index].name2;
        } else {
          this.date[index].shu -= 1;
          this.cc -= this.date[index].name2;
          this.dd-=this.date[index].name2;
          console.log(this.cc);

          this.ee-=this.date[index].name2;
          this.jf-=this.date[index].name2/10;
          this.jf= this.jf.toFixed(1);
        }


      },
      one1(){
        this.rr=true;
        this.rr1=false;
        this.rr2=false;
      },
      one2(){
        this.rr=false;
        this.rr1=true;
        this.rr2=false;
      },
      one3(){
        this.rr=false;
        this.rr1=false;
        this.rr2=true;
      }
      ,
      jia(index) {
        this.date[index].shu += 1;
        this.cc += this.date[index].name2;
        console.log(this.cc);
        this.dd=this.cc;
        console.log(this.cc)
        this.ee=this.cc+this.ff;
        this.jf=this.cc/10;

      },
      xiu(index){
        this.$store.commit('id','yy');
        this.$store.commit('ia',this.data[index].address_id)
        console.log(this.data[index].address_id)
      }
    }
  }
</script>

<style scoped>
  .wai{
    box-sizing: border-box;
    width: 100%;
    min-height: 626px;
    border: 1px solid #e9e9e9;
  }
  .shang{
    box-sizing: border-box;
    width: 100%;
    height: 58px;
    padding-left: 20px;
    font-size: 18px;
    line-height: 58px;
    border-bottom: 1px solid #e9e9e9;
  }
  .shang span:nth-child(1){
    color: #333333;
    width: 464px;
    display: inline-block;
  }
  .shang span:nth-child(2){
    color: #333333;
    width: 92px;
    display: inline-block;
  }
  .shang span:nth-child(3){
    color: #f08200;
    width: 270px;
    display: inline-block;
  }
  .shang span:nth-child(4){
    color: #fff;
    width: 90px;
    height: 30px;
    display: inline-block;
    background: #498e3d;
    line-height: 1.7;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
  }
  .shang span:nth-child(5){
    color: #fff;
    width: 90px;
    height: 30px;
    display: inline-block;
    background: #999;
    line-height: 1.7;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
  }

  .content {
    padding: 20px;
  }
  .xinxi{
    width: 100%;
    height: 272px;
    background: #f9f9f9;
    /*margin: 20px auto 0;*/
    border: 1px solid #e9e9e9;
  }
  .xinxi p{
    padding-top: 15px;
    padding-left: 20px;
    font-size: 16px;
  }
  .xinxi p span:nth-child(1){
    width: 127px;
    display: inline-block;
  }
  .waf{
    height: 56px;
    line-height: 56px;
    font-size: 16px;
    color: #498e3d;
    padding-left: 20px;
  }
  .bdwaik{
    height: 125px;
    width: 1044px;
    margin: auto;
    border: 1px solid #e7e7e7;
    background: #f9f9f9;
  }
  .bdwaik p{
    padding-top: 15px;
    padding-left: 20px;
    font-size: 16px;
  }
  .bdwaik p span:nth-child(1){
    width: 127px;
    display: inline-block;
  }
  .lhin{
    height: 90px;
    width: 1044px;
    margin: auto;
    border: 1px solid #e7e7e7;
    background: #f9f9f9;
    margin-bottom: 20px;
  }
  .lhin p{
    padding-left: 20px;
    padding-top: 15px;
    font-size: 16px;
  }







  .maide{
    /*height: 488px;*/
    width: 100%;
    border: 1px solid #e9e9e9;
  }
  .guige{
    font-size: 16px;
    padding: 15px 0;
    background: #f2f2f2;
  }
  .guige span{
    display: inline-block;
    color: #333;
  }
  .guige span:nth-child(1){
    margin-left: 56px;
  }
  .guige span:nth-child(2){
    margin-left: 269px;
  }
  .guige span:nth-child(3){
    margin-left: 150px;
  }
  .guige span:nth-child(4){
    margin-left: 174px;
  }
  .guige span:nth-child(5){
    margin-left: 150px;
  }

  .yigeshangpin{
    box-sizing: border-box;
    height: 120px;
    width: 100%;
    padding-left: 56px;
    display: flex;
    line-height: 120px;
    font-size: 14px;
    border-top: 1px solid #e9e9e9;
  }
  .yigeshangpin p{
    display: inline-block;
  }
  .yigeshangpin p img{
    width: 100%;
    height: 100%;
  }
  .yigeshangpin p:nth-child(1){
    width: 78px;
    height: 78px;
    border: 1px solid #dedede;
    margin-top: 20px;
  }
  .yigeshangpin p:nth-child(2){
    padding-left: 20px;
    width: 231px;
  }
  .yigeshangpin p:nth-child(3){
    padding-left: 5px;
    width: 186px;
  }
  .yigeshangpin p:nth-child(4){
    padding-left: 5px;
    width: 106px;
  }
  .shuliang {
    width: 250px;
    padding-left: 21px;
  }
  .shuliang span{
    text-align: center;
    line-height: 32px;
    font-size: 16px;
    padding-left: 5px;
  }
  .shuliang span:nth-child(1){
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 1px solid #d3d3d3;
    /*margin-left: 21px;*/
    cursor: pointer;
  }
  .shuliang span:nth-child(2){
    display: inline-block;
    width: 67px;
    height: 32px;
    border-bottom: 1px solid #d3d3d3;
    border-top: 1px solid #d3d3d3;

  }
  .shuliang span:nth-child(3){
    display: inline-block;
    width: 32px;
    height: 32px;
    border: 1px solid #d3d3d3;
    margin-right: 11px;
    cursor: pointer;
  }
  .yigeshangpin p:nth-child(5){
    margin-left: 20px;
    color: #ff5757;
    font-size: 18px;
  }
  .yigeshangpin p:nth-child(6){


    font-size: 18px;
  }
  .liuyanqu{
    height: 115px;
    border-bottom: 1px solid #e9e9e9;
  }
  .liuyanqu p{
    margin-top: 29px;
    height: 59px;
    width: 1280px;
    border-top: 1px solid #e9e9e9;
    line-height: 59px;
    font-size: 18px;
  }
  .liuyanqu input{
    width: 624px;
    height: 23px;
    border: 1px solid #d3d3d3;
    padding-top: 10px;
  }
  ::-webkit-input-placeholder { /* WebKit browsers */
    color: #999;
    padding-left: 5px;
    font-size: 14px;
  }
  ::-moz-placeholder { /* Mozilla Firefox 19+ */
    color: #999;
    padding-left: 5px;
    font-size: 14px;

  }
  :-ms-input-placeholder { /* Internet Explorer 10+ */
    color: #999;
    padding-left: 5px;
    font-size: 14px;

  }


  .zongjifen{
    float: right;
    font-size: 16px;
    color: #666;
    padding-top: 10px;
  }
  .zongjifen span{
    font-size: 22px;
    color: #ff5757;
  }

  .huanya{

    width: 150px;
    height: 50px;
    background: #f08200;
    float: right;
    margin-top: 20px;
    color: #fff;
    text-align: center;
    margin-bottom: 20px;
    line-height: 50px;
    font-size: 20px;
    border-radius: 5px;
    cursor: pointer;
    clear: both;
  }




  .shangbu{
    padding-top: 25px;
    overflow: hidden;
    width: 1280px;
    margin: auto;
    margin-bottom: 20px;
  }
  .oiy{
    border-bottom: 1px solid #e9e9e9;
  }
  .xiangduiying{
    display: inline-block;
    float: right;
    font-size: 18px;
    line-height: 80px;
  }
  .xiangduiying img{
    margin: 0 40px;
    position: relative;
    top: 3px;
  }
  .xiangduiying span{
    color: #333;
    cursor: pointer;
  }
  .xiangduiying span:nth-child(3){
    color: #f08200;
  }

  .dangezong{
    /*height: 80px;*/
    width: 100%;
    /*overflow: hidden;*/
  }
  .dangezong>p{
    margin-right: 40px;
    text-align: right;
  }
  .dangezong>p>span:nth-child(1){
    font-size: 18px;
    color: #666;
    margin-right: 20px;
  }
  .dangezong>p>span:nth-child(2){
    font-size: 24px;
    color: #ff5757;

  }

  .fapiao{
    margin-top: 30px;
    height: 150px;
    border-top: 1px solid #e2e2e2;
  }
  .fapiao p:nth-child(1){
    font-size: 18px;
    color: #666;
    padding-top: 21px;
    padding-bottom: 20px;

  }
  .fapiao p:nth-child(2){
    width: 14px;
    height: 14px;
    border: 1px solid #e2e2e2;
    display: inline-block;
    margin-right: 10px;
    border-radius: 50%;
  }
  .fapiao p:nth-child(3){
    font-size: 14px;
    color: #666;
    margin-right: 40px;
    display: inline-block;
    position: relative;
    top: -3px;
  }
  .fapiao p:nth-child(4){
    width: 14px;
    height: 14px;
    border: 1px solid #e2e2e2;
    display: inline-block;
    margin-right: 10px;
    border-radius: 50%;
  }
  .fapiao p:nth-child(5){
    font-size: 14px;
    color: #666;
    margin-right: 40px;
    display: inline-block;
    position: relative;
    top: -3px;
  }
  .fapiao p:nth-child(6){
    width: 14px;
    height: 14px;
    border: 1px solid #e2e2e2;
    display: inline-block;
    margin-right: 10px;
    border-radius: 50%;
  }
  .fapiao p:nth-child(7){
    font-size: 14px;
    color: #666;
    margin-right: 40px;
    display: inline-block;
    position: relative;
    top: -3px;
  }
  .fapiaotaitou{
    margin-top: 20px;
  }
  .fapiaotaitou span{
    font-size: 14px;
    color: #666;
    position: relative;
    top: 4px;
  }
  .fapiaotaitou input{
    width: 368px;
    height: 33px;
    border: 1px solid #e2e2e2;
    margin-right: 20px;
  }
  .nui{
    background: #0f0;
  }
  .zxc{
    float:right;
    font-size: 16px;
    color: #333;
    clear: both;
    margin-top: 10px;
  }
  .duihuan{
    float: right;
    width: 150px;
    height: 50px;
    border-radius: 5px;
    line-height: 50px;
    text-align: center;
    font-size: 20px;
    color: #fff;
    background: #f08200;
    margin-right: 20px;
    cursor: pointer;
  }
  .quxiao{
    float: right;
    width: 150px;
    height: 50px;
    border-radius: 5px;
    line-height: 50px;
    text-align: center;
    font-size: 20px;
    color: #fff;
    background: #999;
    margin-right: 40px;
    cursor: pointer;
  }
  .btn {
    margin: 20px;
  }
</style>
